import React from 'react';
import { inject, observer } from 'mobx-react';

@inject('portalThemeStore')
@observer
class E8Logout extends React.Component {
  constructor(props) {
    super(props);
    this.onLogout = this.onLogout.bind(this);
  }

  render() {
    return (
      <div className="e8header-logout" onClick={this.onLogout}>
        <div className="e8header-logout-icon">
          <i className="wevicon-account-logout" />
        </div>
      </div>
    );
  }

  onLogout() {
    const { portalThemeStore } = this.props;
    portalThemeStore.onLogout();
  }
}

export default E8Logout;
